﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using Convertor.Interface;
using Wpf.CommonTools.StaticExtension;

namespace Convertor.Plugin.UrlEncode
{
    /// <summary>
    /// ConfigForm.xaml 的交互逻辑
    /// </summary>
    public partial class ConfigForm : PluginConfigForm
    {
        public ConfigForm()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded_1(object sender, RoutedEventArgs e)
        {
            cbSortTypes.ItemsSource = Enum.GetValues(typeof(EncodeTypes));
        }

        #region IPluginConfig 成员

        private ConfigContent config;
        public override object Config
        {
            get { return config; }
            set { config = (value as ConfigContent) == null ? new ConfigContent() : (ConfigContent)((ICloneable)value).Clone(); }
        }

        #endregion

        #region IConfigFormEvent 成员

        public override object GetConfig()
        {
            return ((ConfigContent)Config).Clone();
        }

        #endregion

        #region IPluginHistory 成员

        public override object Input { get; protected set; }

        #endregion
    }
}
